<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var weather = prompt("请输入年份")
        switch (weather) {
            case "3":
            case "4":
            case "5":
                alert("春天")
                break;
            case "6":
            case "7":
            case "8":
                alert("夏天")
                break;
            case "9":
            case "10":
            case "11":
                alert("秋天")
                break;
            case "12":
            case "1":
            case "2":
                alert("冬天")
                break;
        }
    </script>
</body>

</html>